package com.my.java8;


public class StrategyExample {

	public interface ValidationStrategy {
		boolean execute(String s);
	}

	public class IsAllLowerCase implements ValidationStrategy {
		public boolean execute(String s) {
			return s.matches("[a-z]+");
		}
	}

	public class IsNumeric implements ValidationStrategy {
		public boolean execute(String s) {
			return s.matches("\\d+");
		}
	}
	
	public static void testStrategy(ValidationStrategy strategy){
		
	}

	public static void main(String[] args) {
		ValidationStrategy v1 = a->a.matches("[a-z]");
		
		
		testStrategy(a->a.matches("[a-z]"));
	}

}
